import routes from 'server/route/index';
import utils from 'server/core/utils';
import playerStorage from 'js/core/playerStorage';
import PlayerModel from 'server/model/playerModel';
import {
    totalConfig,
    propName
} from 'server/config/templateConfig';

//获取玩家战斗信息
routes.setLogin('getFightAttri', null, (player, msg, cb) => {
    cb(0, player.fightAttri)
}, {

});

//获取背包
routes.setLogin('getBag', null, (player, msg, cb) => {
    cb(0, player.bag)
}, {

});

//保存
routes.setLogin('save', null, (player, msg, cb) => {
    let playerData = new PlayerModel(player);
    playerStorage.save(playerData);
    cb(0)
}, {

});